package com.mccrea.pattern.factory.factorymethod.pizzastore.order;


import com.mccrea.pattern.factory.factorymethod.pizzastore.pizza.LDCheesePizza;
import com.mccrea.pattern.factory.factorymethod.pizzastore.pizza.LDGreekPizza;
import com.mccrea.pattern.factory.factorymethod.pizzastore.pizza.Pizza;

/**
 * @Classname LDOrderPizza
 * @Description 伦敦工厂
 * @Date 2021/5/7 0007 18:48
 * @Created by Mccrea_Gao
 */
public class LDOrderPizza extends OrderPizza {
    @Override
    public Pizza createPizza(String orderType) {
        Pizza pizza = null;
        if ("cheese".equals(orderType)) {
            pizza = new LDCheesePizza();
        } else if ("greek".equals(orderType)) {
            pizza = new LDGreekPizza();
        }
        return pizza;
    }
}
